package com.win.app;

import java.security.DigestException;

import com.li.token.AccessToken;
import com.li.user.JsApiSignInfo;
import com.li.utils.SignUtil;
import com.li.utils.Signature;
import com.li.utils.WeixinPayUtil;
import com.li.utils.WeixinUtil;
import com.li.utils.WxConfigure;
import com.li.utils.WxTools;

public class WeixinManager {
	
	public static String appid = "wxf7372d394dd362cc";
	public static String appsecret = "95f20439e02e8fc4045a4e92e57fcb8d";
	public static String domain= "http://li.hk1.mofasuidao.cn/winImg";
	
	
	
	public static void main(String[] args) {
		AccessToken  act = WeixinUtil.getAccessToken(appid, appsecret);
		System.out.println(act.getAccessToken());
		
		String jsticket = WxConfigure.getJsapi_ticket();
		try {
			JsApiSignInfo jsApi = WeixinPayUtil.getJSAPISign(WxConfigure.getJsapi_ticket(), "pay.jsp", WxTools.getRandomString(16), WxTools.getTimeStamp());
		} catch (DigestException | IllegalAccessException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}

}
